<!DOCTYPE html>
<html>
<head>
<title>管理员列表</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
	name="viewport">
<link rel="stylesheet" href="https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://unpkg.com/font-awesome@4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://unpkg.com/admin-lte@2.3.8/dist/css/AdminLTE.min.css">
<link rel="stylesheet" href="https://unpkg.com/admin-lte@2.3.8/dist/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.11.1/dist/bootstrap-table.min.css">
<link rel="stylesheet" href="/css/main.css">

</head>
<body class="hold-transition skin-blue sidebar-mini">
	<div id="app" class="wrapper" v-cloak>
		<main-header></main-header>
		<main-sidebar></main-sidebar>
		<!-- =============================================== -->
		<!-- Content Wrapper. Contains page content -->
		<div class="content-wrapper">
			<content-header title="管理员管理"></content-header>

			<!-- Main content -->
			<section class="content">
				<div v-show="showList">
					<div class="box">
						<div class="box-header with-border">
							<h3 class="box-title">列表</h3>
						</div>
						<!-- /.box-header -->
						<div class="box-body">
							<div class="form-group">
								<div class="form-group col-md-2">
									<input type="text" class="form-control" v-model="q.username"
										@keyup.enter="query" placeholder="用户名">
								</div>
								<a class="btn btn-default" @click="query">查询</a> <a
									class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
								<a class="btn btn-primary" @click="update"><i
									class="fa fa-pencil-square-o"></i>&nbsp;修改</a> <a
									class="btn btn-primary" @click="del"><i
									class="fa fa-trash-o"></i>&nbsp;删除</a>
							</div>
							<table id="table"></table>
						</div>
					</div>
				</div>

				<div v-show="!showList">
					<div class="box">
						<div class="box-header with-border">
							<h3 class="box-title">{{title}}</h3>
						</div>
						<!-- /.box-header -->
						<div class="box-body">
							<form class="form-horizontal">
								<div class="form-group">
									<div class="col-sm-2 control-label">用户名</div>
									<div class="col-sm-7">
										<input type="text" class="form-control"
											v-model="user.username" placeholder="登录账号" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">密码</div>
									<div class="col-sm-7">
										<input type="text" class="form-control"
											v-model="user.password" placeholder="密码" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">邮箱</div>
									<div class="col-sm-7">
										<input type="text" class="form-control" v-model="user.email"
											placeholder="邮箱" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">手机号</div>
									<div class="col-sm-7">
										<input type="text" class="form-control" v-model="user.mobile"
											placeholder="手机号" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">状态</div>
									<div class="col-sm-7">
										<label class="radio-inline"> <input type="radio"
											name="status" value="0" v-model="user.status" /> 禁用
										</label> <label class="radio-inline"> <input type="radio"
											name="status" value="1" v-model="user.status" /> 正常
										</label>
									</div>
								</div>
								<div class="box-footer">
									<div class="col-sm-2 control-label"></div>
									<input type="button" class="btn btn-primary"
										@click="saveOrUpdate" value="确定" /> &nbsp;&nbsp;<input
										type="button" class="btn btn-warning" @click="reload"
										value="返回" />
								</div>
							</form>
						</div>
					</div>
				</div>

			</section>
		</div>
	</div>
	<script src="https://unpkg.com/jquery@2.2.4/dist/jquery.min.js"></script>
	<script src="https://unpkg.com/vue@2.2.6/dist/vue.min.js"></script>
	<script src="https://unpkg.com/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
	<script src="https://unpkg.com/bootstrap-table@1.11.1/dist/bootstrap-table.min.js"></script>
	<script src="https://unpkg.com/admin-lte@2.3.8/dist/js/app.js"></script>
	<script src="/js/admin/components.js"></script>
	<script src="/js/admin/common.js"></script>
	<script src="/js/admin/sys/user.js"></script>
</body>
</html>